<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>

<style>

#cdiTable th{
	width: 70px;
}
table.tablesorter tbody td {
	color :rgb(71, 115, 255)
}
table.tablesorter  tr.highlight td {
	color :red
}
</style>

<div >



<h2>客訴案件數管報及列表統計 - 客訴案件內容</h2>
<input type="button" onclick="javascript:history.back()" value="回上一層報表">

<table border="1" id="cdiTable" class="tablesorter"  style="width: 2000px;"> 	
	<thead>
	<tr>
	 <th style="width: 30px;">序號 </th>	 	
	 <th>客訴編號</th>
	 <th>受理日期</th>
	 <th>案件階段</th>	 
	 <th>逾期否 </th>
	 <th>階段執行者 </th>
     <th>生產地</th>
     <!-- 
     <th>客訴判定</th>
      -->
      <!--
     <th>權責單位</th>
     -->
     <th>客戶名稱</th>
     <th>新品號</th>
     <th>舊品號</th>
     
     <th>開單日期</th>
     <!-- 
     <th>對策回覆日期</th>
     <th>判定日期</th>
     <th>結案日期</th>
     -->
     <th>處理天數</th>
     <th>產品類別</th>
     <th>異常現象</th>
     <!-- 
     <th>如何發生異常</th>
     <th>製令編號</th>
     <th>異常數/捲</th>     
     <th>業務/負責人員</th>
     <th>銷售處 </th>
     <th>說明欄位</th>
      -->
     <th>是否再發</th>
     <th>客戶送樣承認</th>
     <th>首批交貨</th>
     <!-- 
     <th style="width: 150px;" >初步調查-初步調查與問題定義</th>
      -->
     <th>初步回覆-完成初步調查日期</th>
     <!-- 
     <th>客訴判定-完成客訴判定日期</th>
     <th>客訴判定-備註</th>
     <th>判定原則</th>
     <th>完成真因分析日期 </th>
     <th>真因分析-備註</th>
     <th style="width: 150px;" >真因分析</th>
      -->
     <th>完成永久對策日期</th>
     <!-- 
     <th>永久對策-權責單位</th>
     <th>永久對策-備註</th>
      -->
     <th>完成客戶確認日期</th>
     <th>客戶回覆內容</th>
     <th>客戶確認結果</th>
     <th>結案日期</th>
     <th>工作清單連結</th>
          
     
</tr>
</thead>
	
	<tbody>
	
	<c:forEach var="cdi" items="${cdiList}" varStatus="status" >
	
	
	<c:if test="${cdi.exp == true}">
	 		<tr class="highlight">
	 	</c:if>
	 	<c:if test="${cdi.exp == false}">
	 		<tr>
	 </c:if>
	 <td>${status.index+1 }</td>
	 <td>${cdi.CDIID}</td>	
	 <td> ${cdi.acceptDate } </td>	
	  	
	 <td>${cdi.nowStep}</td>
	 <td> 
	 	<c:if test="${cdi.exp == true}">
	 		是
	 	</c:if>
	 	<c:if test="${cdi.exp == false}">
	 		否
	 	</c:if>  
	 </td>	 	
	 <td> ${cdi.sendToName}</td>	 
     <td>${madeinMap[cdi.madeIn]}</td>
     <td>${custNameMap[cdi.custID]}</td>
     <td>${cdi.newProduct}</td>
     <td>${cdi.oldProduct}</td>
     
     <td>${cdi.startDate}</td>
     <td>${cdi.accessDays}</td>
     <td>${productTypes[cdi.productType]}</td>
     <td>${unusualTypes[cdi.unusualType]}</td>
     <td>${cdi.isSendAgain}</td>
     <td>${cdi.isCustSampleAdmit}</td>
      
     <td>${cdi.isFirstDelivery}</td>
     <td>${cdi.surveyDate5}</td>
     <td>${cdi.finishForeverDate8}</td>
     <td>${cdi.confirmDate9}</td>
     <td>${cdi.reply9}</td>
     <td>${cdi.result9}</td>
     <td>${cdi.confirmDate11}</td>
     <td>      
     	<c:if test="${cdi.todoCount == 0}">
     		${cdi.todoCount}
     	</c:if>
     	<c:if test="${cdi.todoCount != 0}">
     		<a href="<c:url value="/report08v2/0803/find.do?CDIID=${cdi.CDIID}" />">${cdi.todoCount}</a>
     	</c:if>  
     </td>
     

</tr>
	</c:forEach>
	</tbody>
</table>

</div>

<script>
$(function() {
	$("#cdiTable").tablesorter({
		//widgets: ['zebra']
		}); 
})

</script>
